
interface USB {
    void install();
    void work();
}

class Phone implements USB {

    @Override
    public void install() {
        System.out.println("安装手机驱动程序");
    }

    @Override
    public void work() {
        System.out.println("从手机拷贝数据到电脑");
    }
}

class Printer implements USB {

    @Override
    public void install() {
        System.out.println("安装打印机驱动程序");
    }

    @Override
    public void work() {
        System.out.println("打印一份文件");
    }
}

class Camera implements USB {

    @Override
    public void install() {
        System.out.println("安装照相机驱动程序");
    }

    @Override
    public void work() {
        System.out.println("从照相机拷贝照片到电脑");
    }
}

class Computer {
    public void useUSB(USB u) {
        u.install();
        u.work();
        System.out.println();
    }
}

public class T {
    public static void main(String[] args) {
        Phone phone = new Phone();
        Printer printer = new Printer();
        Camera camera = new Camera();
        Computer computer = new Computer();

        computer.useUSB(phone);
        computer.useUSB(printer);
        computer.useUSB(camera);
    }
}
